<template>
  <view class="content">
    <view style="background-color: #165dff; width: 100%; height: 300rpx">
      <image src="../static/images/title-icon.png" mode="widthFix" class="title-bar">
      </image>
      <view class="search-bar-container">
        <view style="flex: 6">
          <uni-search-bar class="uni-mt-10" bgColor="rgba(255, 255, 255, 0.3)" radius="100" placeholder="搜索关键词"
            clearButton="auto" cancelButton="none" @confirm="search">
            <uni-icons slot="searchIcon" color="#fff" size="18" type="search" />
          </uni-search-bar>
        </view>
        <view style="flex: 1;margin-left: 20rpx;">
          <uni-icons type="scan" size="30" color="#fff"></uni-icons>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      searchValue: "123123",
    };
  },
  methods: {
    search(res) {
      uni.showToast({
        title: "搜索：" + res.value,
        icon: "none",
      });
    },
  },
};
</script>

<style lang="scss">
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.title-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 400rpx;
  height: 400rpx;
}

.search-bar-container {
  margin-top: 200rpx;
  display: flex;
  align-items: center;
  opacity: 0.6;
}

/deep/ .uni-searchbar__box .uni-searchbar__text-placeholder {
  color: #fff;
  opacity: 1;
}

.search-result {
  padding-top: 10px;
  padding-bottom: 20px;
  text-align: center;
}

.search-result-text {
  text-align: center;
  font-size: 14px;
  color: #666;
}

.example-body {
  /* #ifndef APP-NVUE */
  display: block;
  /* #endif */
  padding: 0px;
}

.uni-mt-10 {
  margin-top: 10px;
}
</style>
